﻿using TouchSocket.Core;

namespace SL651Center2.x.ReadMessage
{
    public class SYN
    {
        static List<byte> _bytes = new List<byte>();
        public static void Write(byte[] bytes)
        {
            _bytes.AddRange(bytes);
        }
        public static void Clera()
        {
            _bytes.Clear();
            Block.SetHolding(false);

        }

        public static ByteBlock Block
        {
            get
            {
                ByteBlock block = new ByteBlock(_bytes.Count);
                block.Write(_bytes.ToArray());
                block.SeekToStart();
                block.SetHolding(true);
                return block;
            }
        }
    }
}
